package com.qf.dao.impl;

import com.qf.dao.OpenDao;
import com.qf.model.Card;
import com.qf.model.User;
import com.qf.utils.DruidUtil;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;

import java.util.List;

public class OpenDaoImpl implements OpenDao {
    private JdbcTemplate jdbcTemplate=new JdbcTemplate(DruidUtil.getDataSource());


    @Override
    public int addOpenCard(Card card) {
        String sql="insert into Card(c_account, c_phone,c_pwd,u_id) values(?,?,?,?)";
        int num=jdbcTemplate.update(sql,card.getC_account(), card.getC_phone(),card.getC_pwd(),card.getU_id());
        return num;
    }
}
